home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / pc / software / wissen / macos / fft121.hqx / FFTs for RISC 1.21 / ffttest.m < prev    next >
Text File  |  1996-06-27  |  342b  |  19 lines

  1. N=64;
  2. j=sqrt(-1);
  3. a=ones(N,1);
  4. row=1;
  5. for i1=1:N;
  6.     a(i1) = sqrt(row+i1-1+.77777)+j*((row+i1-1+.22222)*(row+i1-1+.22222) / N - N/2);
  7. end;
  8. a(1) = N+3+j*imag(a(1));
  9. a(2) = 1-N+j*imag(a(2));
  10. A=fft(a);
  11. a1=ifft(A);
  12. if N<=32
  13.     A
  14.     a1
  15. end
  16. max(abs(A-atrans))./(max(abs(A))/N)
  17. max(abs(a-aitrans))./(max(abs(a))/N)
  18. %max(abs(a1-aitrans))./(max(abs(a1))/N)
  19.